<form action="index.php" method="POST">
<fieldset>
	<dl>
		<dt>
			User Name:
		</dt>
		<dd>
			<?php if(!$user->id): ?>
				<input type="text" name="user_name" value="<?=$user->user_name ?>"/>
			<?php else: ?>
				<?= $user->user_name ?>
			<?php endif ?>
		</dd>
		<?php if(!$user->id): ?>
			<dt>
				Password:
			</dt>
			<dd>
				<input type="password" name="password"/>
			</dd>	
			<dt>
				Retype Password:
			</dt>
			<dd>
				<input type="password" name="password_check"/>
			</dd>		
		<?php else: ?>
			<dt>
				Password:
			</dt>
			<dd>
				<a href="?controller=User&amp;action=change_password">Change Password</a>
			</dd>
		<?php endif ?>
		<dt>
			First Name:
		</dt>
		<dd>
			<input type="text" name="first_name" value="<?=$user->first_name ?>"/>
		</dd>
		<dt>
			Last Name:
		</dt>
		<dd>
			<input type="text" name="last_name" value="<?=$user->last_name ?>"/>
		</dd>
		<dt>
			Email:
		</dt>
		<dd>
			<input type="text" name="email" value="<?=$user->email ?>"/>
		</dd>		
	</dl>
</fieldset>
<input type="hidden" name="controller" value="User" />
<input type="hidden" name="action" value="save" />
<input type="hidden" name="id" value="<?=$user->id ?>" />
<input type="submit" value="Save User" />

</form>
<?php if(!$user->is_new()): ?>
<form action="index.php" method="post">
	<input type="hidden" name="controller" value="User" />
	<input type="hidden" name="action" value="delete" />
	<input type="hidden" name="id" value="<?=$user->id ?>" />
	<input type="submit" value="Delete User" />
</form>
<?php endif ?>